// pages/post/post.js
var postData = require('../../data/posts-data.js')
Page({

  /**
   * 页面的初始数据
   */
  data: {

  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    this.setData({
      postList: postData.postList
    });
  },


  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {

  },

  onPostTap: function (event) {
    var postId = event.currentTarget.dataset.postid;
    wx.navigateTo({
      url: "../post-detail/post-detail?postId=" + postId,
      success: function(res) {},
      fail: function(res) {},
      complete: function(res) {},
    })
  }

})